/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package reloj.DAO;

import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;

/**
 *
 * @author Dianita
 */
public class FuenteDatos {

    private static EntityManager em = null;

    public static EntityManager getEntityManager(){
        if(em == null || em.isOpen()){
            EntityManagerFactory emf = Persistence.createEntityManagerFactory("RelojBiometricoPU");
            em = emf.createEntityManager();
        }

        return em;

    }//fin EntityManager

    //entidad=COMILPU
}//fin class FuenteDatos
